<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.1/jquery.js"></script>
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.1/jquery.min.js"></script>
    <script src="https://cdn.bootcdn.net/ajax/libs/echarts/4.2.1/echarts.min.js"></script>

    <style>
        #fullScreenMask {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            display: none;
            z-index: 9999999;
          background-color: #ffffff;
        }

        #fullScreen {
            width: 80%;
            height: 80%;
        }
    </style>

</head>
<body>

<div id="fullScreenMask">

    <a href="javascript:void(0)" onclick="myfullscreen()">放大</a>
    <div class="echarts" id="fullScreen"></div>
</div>
</body>
<script>
    myfullscreen = function dofull() {
        var options = rootchart.getOption();
        setFullScreenToolBox(options);
    }
    //全屏显示 toolbox回调
    //@param option   echarts的配置项
    function setFullScreenToolBox(option) {
        if ($('#fullScreenMask').css('display') === 'block') {
            $('#fullScreenMask').hide();
            ChartScreen = null;
            return false;
        }

        $('#fullScreenMask').show();
        chartScreen = echarts.init(document.getElementById('fullScreen'));
        chartScreen.setOption(option);
        return true;
    }
</script>
</html>